package com.itpuyang.design23.factory.simple;

public class Carfactory {

    public static Car getCar(String car){
        if (car.equals("Wuling")){
            return new Wuling();
        }else if (car.equals("Tesla")){
            return new Tesla();
        }else if (car.equals("Mobai")){
            return new Mobai();
        }else{
            return null;
        }
    }
}
